<?php
 if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Class User extends MY_Controller
{
    public function __construct()
    {
        parent::__construct();
        //$this->checkAdmin($this->session->userdata('admin_id'));
        $this->data['controller'] = 'user';         
        $this->load->model('Muser');
    }
    
    public function loginemail()
    {
        die(json_encode($this->Muser->loginUserEmail()));
    }
    
    public function loginmobile()
    {
        die(json_encode($this->Muser->loginUserMobile()));
    }
    
    public function loginCard()
    {
        die(json_encode($this->Muser->loginCard()));
    }
     public function loginfacebook()
    {
        die(json_encode($this->Muser->registerFacebookDB()));   
    }
    
    public function info()
    {
        die(json_encode($this->Muser->infoUser($this->getParamInt('id'))));
    }
    
    public function saveinfo()
    {
        die(json_encode($this->Muser->saveinfoDB()));
    }

    public function changepass()
    {
        die(json_encode($this->Muser->changePassDB()));
    }
    
    public function forgotpass()
    {
        die(json_encode($this->Muser->forGotDB()));
    }
    
    public function register()
    {
        die(json_encode($this->Muser->registerUser($this->data['baseurl'])));   
    }
    
    public function verifyaccount()
    {
        die(json_encode($this->Muser->verifyaccountDB()));   
    }
    
   public function getagegroup(){
        die(json_encode($this->Muser->getAgeGroup())); 
   }
    
    public function getjob(){
        die(json_encode($this->Muser->getJob()));
    }
		
	public function activeuser(){
		echo $this->Muser->activeUser();
	}	
	public function testsendmail(){
		die(json_encode($this->Muser->testsendmail()));
	}
	public function test(){
		die(json_encode($this->Muser->test()));
	}
}
